﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlServerCe;

namespace RCSnake
	{
	class SqlCeConnectionSecure
		{
		/*---------------------------------------------*\
		|*                 Attributs                   *|
		\*---------------------------------------------*/
		private SqlCeConnection m_ctn;	
			
		/*---------------------------------------------*\
		|*                Constructeur                 *|
		\*---------------------------------------------*/
		public SqlCeConnectionSecure(String database)
			{
			m_ctn = new SqlCeConnection();
			m_ctn.ConnectionString = "Data Source='" + database + "'";
			m_ctn.Open();
			}
		~SqlCeConnectionSecure()
			{
			m_ctn.Close();
			}
		/*---------------------------------------------*\
		|*               Methodes public               *|
		\*---------------------------------------------*/
		public SqlCeConnection connection
			{
			get { return m_ctn; }
			}
		}
	}
